package com.hcb.tonguetiphealth.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.hcb.tonguetiphealth.manager.SmileyParser;
import com.hcb.tonguetiphealth.view.R;

public class ChatGridViewAdapter extends BaseAdapter{
	private  Context context;
	public   ChatGridViewAdapter(Context context1 ){
		this.context=context1;
	}
	
	@Override
	public View getView(final int position, View convertView, ViewGroup parent) {
		LayoutInflater mInflater = LayoutInflater.from(context);   
		View view= mInflater.inflate(R.layout.chat_gridview_expression_cell, null); 
  	    TextView tv_title=(TextView)view.findViewById(R.id.image);
  	    CharSequence convertContent = SmileyParser.getInstance()
		.addSmileySpans(SmileyParser.mSmileyTexts[position]);
  	    tv_title.setText(convertContent);
		return view;
	}
	@Override
	public int getCount() {
		// TODO Auto-generated method stub
		return SmileyParser.mSmileyTexts.length;
	}
	@Override
	public Object getItem(int position) {
		// TODO Auto-generated method stub
		return null;
	}
	@Override
	public long getItemId(int position) {
		// TODO Auto-generated method stub
		return 0;
	}
}